using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Management;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Windows.Forms;
using Fcdbas.Core.Windows;
namespace Fcdbas.Core
{
	public static class Vis
	{
		private class ArrayComparer : IComparer
		{
			public const int Ascending = 0;
			public const int Descending = 1;
			private int direction;
			public int SortDirection
			{
				get
				{
					return this.direction;
				}
				set
				{
					this.direction = value;
				}
			}
			public int Compare(object x, object y)
			{
				int num;
				if (x == null && y == null)
				{
					num = 0;
				}
				else
				{
					if (x == null && y != null)
					{
						num = -1;
					}
					else
					{
						if (x != null && y == null)
						{
							num = 1;
						}
						else
						{
							if (x is SalString || x is string)
							{
								num = string.Compare(x.ToString(), y.ToString(), StringComparison.OrdinalIgnoreCase);
							}
							else
							{
								if (x is IComparable)
								{
									num = ((IComparable)x).CompareTo(y);
								}
								else
								{
									if (!(y is IComparable))
									{
										throw new ArgumentException(Vis.GetString("SortedElementsNoIComparable"));
									}
									num = -((IComparable)y).CompareTo(x);
								}
							}
						}
					}
				}
				if (this.direction == 1)
				{
					num = -num;
				}
				return num;
			}
		}
		private class EnumPropsVisitor
		{
			public int Count;
			public SalArray<SalString> PropNames;
			public SalArray<SalNumber> PropValues;
			public EnumPropsVisitor(SalArray<SalString> sPropNames, SalArray<SalNumber> nPropValues)
			{
				this.PropNames = sPropNames;
				this.PropValues = nPropValues;
			}
			public bool Enum(IntPtr handle, string name, IntPtr value)
			{
				this.PropNames[new int[]
				{
					this.Count
				}] = name;
				this.PropValues[new int[]
				{
					this.Count
				}] = (int)value;
				this.Count++;
				return true;
			}
		}
		[SuppressUnmanagedCodeSecurity]
		internal class WinSDK
		{
			public delegate bool PropEnumProc(IntPtr hwnd, string lpszString, IntPtr hData);
			internal struct COMBOBOXINFO
			{
				public int cbSize;
				public Rectangle rcItem;
				public Rectangle rcButton;
				public int stateButton;
				public IntPtr hwndCombo;
				public IntPtr hwndItem;
				public IntPtr hwndList;
			}
			[Flags]
			public enum ImageOptions
			{
				LR_DEFAULTCOLOR = 0,
				LR_MONOCHROME = 1,
				LR_COLOR = 2,
				LR_COPYRETURNORG = 4,
				LR_COPYDELETEORG = 8,
				LR_LOADFROMFILE = 16,
				LR_LOADTRANSPARENT = 32,
				LR_DEFAULTSIZE = 64,
				LR_VGACOLOR = 128,
				LR_LOADMAP3DCOLORS = 4096,
				LR_CREATEDIBSECTION = 8192,
				LR_COPYFROMRESOURCE = 16384,
				LR_SHARED = 32768
			}
			public enum ImageType
			{
				IMAGE_BITMAP,
				IMAGE_ICON,
				IMAGE_CURSOR
			}
			internal struct LVHITTESTINFO
			{
				public Point pt;
				public uint flags;
				public int iItem;
				public int iSubItem;
			}
			internal struct LVFINDINFO
			{
				public uint flags;
				public IntPtr psz;
				public IntPtr lParam;
				public Point pt;
				public uint vkDirection;
			}
			internal struct TVHITTESTINFO
			{
				public Point pt;
				public uint flags;
				public IntPtr hItem;
			}
			internal struct TV_ITEM
			{
				public int mask;
				public IntPtr hItem;
				public int state;
				public int stateMask;
				public IntPtr pszText;
				public int cchTextMax;
				public int iImage;
				public int iSelectedImage;
				public int cChildren;
				public IntPtr lParam;
			}
			internal struct LVITEM
			{
				public int mask;
				public int iItem;
				public int iSubItem;
				public int state;
				public int stateMask;
				public string pszText;
				public int cchTextMax;
				public int iImage;
				public IntPtr lParam;
				public int iIndent;
			}
			internal struct PARAFORMAT
			{
				public uint cbSize;
				public uint dwMask;
				public short wNumbering;
				public short wReserved;
				public int dxStartIndent;
				public int dxRightIndent;
				public int dxOffset;
				public short wAlignment;
				public short cTabCount;
				[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
				public int[] rgxTabs;
			}
			internal struct LOGBRUSH
			{
				public int lbStyle;
				public int lbColor;
				public IntPtr lbHatch;
			}
			internal struct WINDOWPOS
			{
				public IntPtr hwnd;
				public IntPtr hwndInsertAfter;
				public int x;
				public int y;
				public int cx;
				public int cy;
				public int flags;
			}
			internal struct NMHDR
			{
				public IntPtr hwndFrom;
				public IntPtr idFrom;
				public int code;
			}
			internal struct NMTREEVIEW
			{
				public Vis.WinSDK.NMHDR nmhdr;
				public int action;
				public Vis.WinSDK.TV_ITEM itemOld;
				public Vis.WinSDK.TV_ITEM itemNew;
				public int ptDrag_X;
				public int ptDrag_Y;
			}
			internal struct NMLISTVIEW
			{
				public Vis.WinSDK.NMHDR hdr;
				public int iItem;
				public int iSubItem;
				public int uNewState;
				public int uOldState;
				public int uChanged;
				public IntPtr lParam;
			}
			internal struct NMDAYSTATE
			{
				public Vis.WinSDK.NMHDR nmhdr;
				public Vis.WinSDK.SYSTEMTIME stStart;
				public int cDayState;
				public IntPtr prgDayState;
			}
			internal struct SYSTEMTIME
			{
				public short wYear;
				public short wMonth;
				public short wDayOfWeek;
				public short wDay;
				public short wHour;
				public short wMinute;
				public short wSecond;
				public short wMilliseconds;
			}
			internal struct NETRESOURCE
			{
				public int dwScope;
				public int dwType;
				public int dwDisplayType;
				public int dwUsage;
				public string LocalName;
				public string RemoteName;
				public string Comment;
				public string Provider;
			}
			public const int EM_GETMODIFY = 184;
			public const int EM_SETMODIFY = 185;
			public const int WM_DESTROY = 2;
			public const int WM_NCDESTROY = 130;
			public const int WM_SETFOCUS = 7;
			public const int WM_KILLFOCUS = 8;
			public const int WM_SETREDRAW = 11;
			public const int WM_PAINT = 15;
			public const int WM_SHOWWINDOW = 24;
			public const int WM_NCACTIVATE = 134;
			public const int WM_WINDOWPOSCHANGING = 70;
			public const int WM_KEYFIRST = 256;
			public const int WM_KEYDOWN = 256;
			public const int WM_KEYUP = 257;
			public const int WM_CHAR = 258;
			public const int WM_DEADCHAR = 259;
			public const int WM_SYSKEYDOWN = 260;
			public const int WM_SYSKEYUP = 261;
			public const int WM_SYSCHAR = 262;
			public const int WM_SYSDEADCHAR = 263;
			public const int WM_UNICHAR = 265;
			public const int WM_KEYLAST = 265;
			public const int WM_COMMAND = 273;
			public const int WM_MOUSEFIRST = 512;
			public const int WM_MOUSEMOVE = 512;
			public const int WM_LBUTTONDOWN = 513;
			public const int WM_LBUTTONUP = 514;
			public const int WM_LBUTTONDBLCLK = 515;
			public const int WM_RBUTTONDOWN = 516;
			public const int WM_RBUTTONUP = 517;
			public const int WM_RBUTTONDBLCLK = 518;
			public const int WM_MBUTTONDOWN = 519;
			public const int WM_MBUTTONUP = 520;
			public const int WM_MBUTTONDBLCLK = 521;
			public const int WM_MOUSEWHEEL = 522;
			public const int WM_XBUTTONDOWN = 523;
			public const int WM_XBUTTONUP = 524;
			public const int WM_XBUTTONDBLCLK = 525;
			public const int WM_MOUSELAST = 525;
			public const int WM_REFLECTEDCOMMAND = 8465;
			public const int WM_REFLECTEDNOTIFY = 8270;
			public const int LB_SETSEL = 389;
			public const int LB_SETCARETINDEX = 414;
			public const int LB_GETCARETINDEX = 415;
			public const int LB_ITEMFROMPOINT = 425;
			public const int LB_GETITEMDATA = 409;
			public const int LB_SETITEMDATA = 410;
			public const int LB_SETTOPINDEX = 407;
			public const int LB_SETTABSTOPS = 402;
			public const int LB_SETITEMHEIGHT = 416;
			public const int LVM_FIRST = 4096;
			public const int LVM_GETNEXTITEM = 4108;
			public const int LVM_SETITEMPOSITION = 4111;
			public const int LVM_SETITEMSTATE = 4139;
			public const int LVM_HITEST = 4114;
			public const int LVM_SCROLL = 4116;
			public const int LVM_GETVIEWRECT = 4130;
			public const int LVM_GETCOUNTPERPAGE = 4136;
			public const int LVM_GETORIGIN = 4137;
			public const int LVM_FINDITEMW = 4179;
			public const int LVM_GETSTRINGWIDTHW = 4183;
			public const int LVM_GETVIEW = 4239;
			public const int TV_FIRST = 4352;
			public const int TVM_SELECTITEM = 4363;
			public const int TVM_HITTEST = 4369;
			public const int TVM_SETITEMW = 4415;
			public const int TVM_GETNEXTITEM = 4362;
			public const int TVN_DELETEITEMA = -409;
			public const int TVN_DELETEITEMW = -458;
			public const int TVN_BEGINDRAGA = -407;
			public const int TVN_BEGINDRAGW = -456;
			public const int TVN_BEGINRDRAGA = -408;
			public const int TVN_BEGINRDRAGW = -457;
			public const int TVGN_PARENT = 3;
			public const int CBN_ERRSPACE = -1;
			public const int CBN_SELCHANGE = 1;
			public const int CBN_DBLCLK = 2;
			public const int CBN_SETFOCUS = 3;
			public const int CBN_KILLFOCUS = 4;
			public const int CBN_EDITCHANGE = 5;
			public const int CBN_EDITUPDATE = 6;
			public const int CBN_DROPDOWN = 7;
			public const int CBN_CLOSEUP = 8;
			public const int CBN_SELENDOK = 9;
			public const int CBN_SELENDCANCEL = 10;
			public const int EN_CHANGE = 768;
			public const int EM_SETOPTIONS = 1101;
			public const int EM_LINELENGTH = 193;
			public const int EM_LINEINDEX = 187;
			public const int EM_LINEFROMCHAR = 201;
			public const int EM_LINESCROLL = 182;
			public const int EM_GETLINECOUNT = 186;
			public const int EM_GETFIRSTVISIBLELINE = 206;
			public const int EM_HIDESELECTION = 1087;
			public const int EM_GETPARAFORMAT = 1085;
			public const int EM_SETPARAFORMAT = 1095;
			public const int GWL_STYLE = -16;
			public const int GWL_EXSTYLE = -20;
			public const int WS_BORDER = 8388608;
			public const int WS_TABSTOP = 65536;
			public const int WS_DISABLED = 134217728;
			public const int WS_EX_CLIENTEDGE = 512;
			public const int WS_EX_DLGMODALFRAME = 1;
			public const int WS_EX_LAYOUTRTL = 4194304;
			public const int WS_EX_NOINHERITLAYOUT = 1048576;
			public const int WS_EX_RTLREADING = 8192;
			public const int WS_EX_RIGHT = 4096;
			public const int WS_EX_LEFTSCROLLBAR = 16384;
			public const int SWP_NOSIZE = 1;
			public const int SWP_NOMOVE = 2;
			public const int SWP_NOZORDER = 4;
			public const int SWP_NOREDRAW = 8;
			public const int SWP_NOACTIVATE = 16;
			public const int SWP_FRAMECHANGED = 32;
			public const int SWP_SHOWWINDOW = 64;
			public const int SWP_HIDEWINDOW = 128;
			public const int SWP_NOCOPYBITS = 256;
			public const int SWP_NOOWNERZORDER = 512;
			public const int SWP_NOSENDCHANGING = 1024;
			public const int TVIF_TEXT = 1;
			public const int TVIF_STATE = 8;
			public const int TVIF_CHILDREN = 64;
			public const int TVGN_CARET = 9;
			public const int TVGN_DROPHILITE = 8;
			public const int TVIS_SELECTED = 2;
			public const int TVIS_DROPHILITED = 8;
			public const int TVS_NOHSCROLL = 32768;
			public const int ERROR_CONNECTION_UNAVAIL = 1201;
			public const int RESOURCETYPE_DISK = 1;
			public const int CONNECT_INTERACTIVE = 8;
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, string lParam);
			[DllImport("user32.dll", CharSet = CharSet.Ansi)]
			public static extern IntPtr SendMessageA(IntPtr hWnd, int wMsg, IntPtr wParam, string lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref Rectangle lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref Point lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref Vis.WinSDK.LVFINDINFO lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref Vis.WinSDK.LVHITTESTINFO lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref Vis.WinSDK.TVHITTESTINFO lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref Vis.WinSDK.TV_ITEM lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref Vis.WinSDK.LVITEM lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref Vis.WinSDK.PARAFORMAT lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, int[] lParam);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern int GetProp(IntPtr handle, string name);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool SetProp(IntPtr handle, string name, IntPtr value);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern int GetSystemMetrics(int nIndex);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool IsWindow(IntPtr hWnd);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool IsChild(IntPtr hWndParent, IntPtr hWndChild);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool IsIconic(IntPtr hWnd);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool IsZoomed(IntPtr hWnd);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool RemoveProp(IntPtr handle, string name);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern int SetWindowLong(IntPtr hWnd, int index, int value);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern int GetWindowLong(IntPtr hWnd, int index);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern int EnumProps(IntPtr handle, Vis.WinSDK.PropEnumProc lpEnumFunc);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern short GetKeyState(int keyCode);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr LoadImage(IntPtr hinst, string name, int type, int width, int height, int load);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int flags);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool GetComboBoxInfo(IntPtr hwndCombo, ref Vis.WinSDK.COMBOBOXINFO pcbi);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr GetDCEx(IntPtr hWnd, IntPtr hrgnClip, int flags);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr GetDesktopWindow();
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern int GetDialogBaseUnits();
			[DllImport("user32.dll", CharSet = CharSet.Auto)]
			public static extern bool GetClientRect(IntPtr hWnd, ref Rectangle lpRect);
			[DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
			public static extern int GetPrivateProfileSection(string lpAppName, [MarshalAs(UnmanagedType.LPArray)] byte[] lpReturnedString, int nSize, string lpFileName);
			[DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
			public static extern int WritePrivateProfileSection(string lpAppName, string lpString, string lpFileName);
			[DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
			public static extern int WritePrivateProfileString(string lpAppName, string lpKeyName, string lpString, string lpFileName);
			[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr LoadLibrary(string name);
			[DllImport("kernel32.dll")]
			public static extern IntPtr FreeLibrary(IntPtr handle);
			[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
			public static extern int SearchPath(string lpPath, string lpFileName, string lpExtension, int nBufferLength, StringBuilder lpBuffer, StringBuilder lpFilePart);
			[DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
			public static extern bool SetVolumeLabel(string lpRootPathName, string lpVolumeName);
			[DllImport("kernel32.dll")]
			public static extern int GetLastError();
			[DllImport("kernel32.dll")]
			public static extern IntPtr GetModuleHandle(string lpModuleName);
			[DllImport("kernel32.dll")]
			public static extern int GetModuleFileName(IntPtr hModule, StringBuilder lpFilename, int nSize);
			[DllImport("shell32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr ExtractIcon(IntPtr hinst, string fileName, int iconIndex);
			[DllImport("shell32.dll", CharSet = CharSet.Auto)]
			public static extern IntPtr FindExecutable(string lpFile, string lpDirectory, StringBuilder lpResult);
			[DllImport("mpr.dll")]
			public static extern int WNetAddConnection(string lpRemoteName, string lpPassword, string lpLocalName);
			[DllImport("mpr.dll")]
			public static extern int WNetCancelConnection(string lpName, bool fForce);
			[DllImport("mpr.dll")]
			public static extern int WNetGetConnection(string lpLocalName, StringBuilder lpRemoteName, ref int lpnLength);
			[DllImport("mpr.dll")]
			public static extern int WNetAddConnection2(ref Vis.WinSDK.NETRESOURCE lpNetResource, string lpPassword, string lpUsername, uint dwFlags);
			[DllImport("gdi32.dll")]
			public static extern IntPtr SelectObject(IntPtr hDC, IntPtr hObject);
			[DllImport("gdi32.dll")]
			public static extern bool DeleteObject(IntPtr hObject);
			[DllImport("gdi32.dll")]
			public static extern IntPtr CreateBitmap(int nWidth, int nHeight, int nPlanes, int nBitsPerPixel, short[] lpvBits);
			[DllImport("gdi32.dll")]
			public static extern IntPtr CreateBrushIndirect(ref Vis.WinSDK.LOGBRUSH lb);
			[DllImport("gdi32.dll")]
			public static extern bool PatBlt(IntPtr hdc, int left, int top, int width, int height, int rop);
		}
		public const int DT_Handle = 256;
		public const int SORT_Ascending = 0;
		public const int SORT_Descending = 1;
		public const int CALN_ErrSpace = -1;
		public const int CALN_DateChanged = 1;
		public const int CALN_DateFinished = 2;
		public const int CALN_Scroll = 3;
		public const int CAL_AlternateButtons = 4096;
		public const int CAL_EnableButtons = 4;
		public const int CAL_EnableKeyboard = 8;
		public const int CAL_EtchedLook = 16;
		public const int CAL_MultiSelect = 32;
		public const int CAL_SelectExtra = 64;
		public const int CAL_SelectSpecial = 128;
		public const int CAL_ShowExtra = 256;
		public const int CAL_ShowFocus = 512;
		public const int CAL_ShowGrid = 1024;
		public const int CAL_ShowSpecial = 2048;
		public const int COLOR_CAL_BackExtra = 2;
		public const int COLOR_CAL_BackLabel = 3;
		public const int COLOR_CAL_ForeDays = 10;
		public const int COLOR_CAL_ForeExtra = 11;
		public const int COLOR_CAL_ForeMonth = 13;
		public const int SPECIAL_Unset = 0;
		public const int SPECIAL_OneTime = 1;
		public const int SPECIAL_Weekly = 2;
		public const int SPECIAL_MonthlyDOM = 3;
		public const int SPECIAL_MonthlyDOW = 4;
		public const int SPECIAL_Yearly = 5;
		public const int SPECIAL_YearlyDOW = 6;
		public const int DAY_Unset = 0;
		public const int DAY_Sunday = 1;
		public const int DAY_Monday = 2;
		public const int DAY_Tuesday = 3;
		public const int DAY_Wednesday = 4;
		public const int DAY_Thursday = 5;
		public const int DAY_Friday = 6;
		public const int DAY_Saturday = 7;
		public const int SEQ_Unset = 0;
		public const int SEQ_First = 1;
		public const int SEQ_Second = 2;
		public const int SEQ_Third = 3;
		public const int SEQ_Fourth = 4;
		public const int SEQ_Last = 5;
		public const int DESKTOP_Root = -1;
		public const int DESKTOP_MyComputer = -2;
		public const int DESKTOP_NetworkNeighborhood = -3;
		public const int hPicNull = 0;
		public const string CAPTION_ErrorHandler = "PPJ Framework";
		public const int ACTION_Retry = 1;
		public const int ACTION_Abort = 2;
		public const int KS_Down = 32768;
		public const int KS_LockOn = 1;
		public const int VTERR_Ok = 0;
		public const int VTERR_FileNotFound = -2;
		public const int VTERR_PathNotFound = -3;
		public const int VTERR_TooManyFiles = -4;
		public const int VTERR_AccessDenied = -5;
		public const int VTERR_InvalidHandle = -6;
		public const int VTERR_NoMemory = -8;
		public const int VTERR_InvalidData = -13;
		public const int VTERR_InvalidDrive = -15;
		public const int VTERR_NoMoreFiles = -18;
		public const int VTERR_EndOfFile = -18;
		public const int VTERR_WriteProtected = -19;
		public const int VTERR_DriveNotReady = -21;
		public const int VTERR_WriteFault = -29;
		public const int VTERR_ReadFault = -30;
		public const int VTERR_SharingViolation = -32;
		public const int VTERR_LockViolation = -33;
		public const int VTERR_DiskFull = -39;
		public const int VTERR_BadNetPath = -53;
		public const int VTERR_NetworkBusy = -54;
		public const int VTERR_NetNameDeleted = -64;
		public const int VTERR_NetworkAccessDenied = -65;
		public const int VTERR_BadNetName = -67;
		public const int VTERR_InvalidParameter = -87;
		public const int VTERR_NetWriteFault = -88;
		public const int VTERR_NetworkUnreachable = -1231;
		public const int VTM_Base = 24576;
		public const int VTM_Click = 24579;
		public const int VTM_Destroy = 24580;
		public const int VTM_Populate = 24581;
		public const int VTM_Accelerator = 24582;
		public const int VTM_MenuSelect = 24583;
		public const int VTM_ControlCreate = 24584;
		public const int VTM_OutlineCornerClick = 24585;
		public const int VTM_CreateComplete = 24586;
		public const int VTM_LVColumnClick = 24590;
		public const int VTM_Create = 129;
		public const int VTM_Char = 258;
		public const int VTM_Enable = 10;
		public const int VTM_EraseBkgnd = 20;
		public const int VTM_KeyDown = 256;
		public const int VTM_KeyUp = 257;
		public const int VTM_LeftClick = 514;
		public const int VTM_LeftDoubleClick = 515;
		public const int VTM_RightClick = 517;
		public const int VTM_RightDoubleClick = 518;
		public const int VTM_MiddleClick = 520;
		public const int VTM_MiddleDoubleClick = 521;
		public const int VTM_Size = 5;
		public const int EM_SetReadOnly = 207;
		public const int NM_First = -1;
		public const int NM_OutOfMemory = -1;
		public const int NM_Click = -2;
		public const int NM_DoubleClick = -3;
		public const int NM_Return = -4;
		public const int NM_RightClick = -5;
		public const int NM_RightDoubleClick = -6;
		public const int NM_SetFocus = -7;
		public const int NM_KillFocus = -8;
		public const int PIC_LoadSWinStr = 256;
		public const int PIC_LoadResource = 512;
		public const int PIC_LoadFile = 1024;
		public const int PIC_LoadSWinRes = 2048;
		public const int PIC_LoadSmallIcon = 4096;
		public const int PIC_LoadLargeIcon = 8192;
		public const string VT_DLLName = "PPJ.Runtime.Vis.res";
		public const string VTPIC_BookClosed = "bkclosed";
		public const string VTPIC_BookOpen = "bkopen";
		public const string VTPIC_BookShelf2 = "bkshelf2";
		public const string VTPIC_BookShelf3 = "bkshelf3";
		public const string VTPIC_CheckBlack = "chkblk";
		public const string VTPIC_CheckWhite = "chkwht";
		public const string VTPIC_Desktop = "desktop";
		public const string VTPIC_DiamondBlackClosed = "diablkc";
		public const string VTPIC_DiamondBlackOpen = "diablko";
		public const string VTPIC_DiamondWhiteClosed = "diawhtc";
		public const string VTPIC_DiamondWhiteOpen = "diawhto";
		public const string VTPIC_DriveCDROM = "drvcd2";
		public const string VTPIC_DriveCDROM2 = "drvcd3";
		public const string VTPIC_DriveFloppy = "drvflop2";
		public const string VTPIC_DriveFixed = "drvhard2";
		public const string VTPIC_DriveNetwork = "drvnet2";
		public const string VTPIC_DriveNetworkX = "drvnetx";
		public const string VTPIC_DriveRAM = "drvram2";
		public const string VTPIC_Empty = "empty";
		public const string VTPIC_FileAllOther = "fileall";
		public const string VTPIC_FileDocuments = "filedoc";
		public const string VTPIC_FilePrograms = "fileprog";
		public const string VTPIC_FileSystem = "filesys";
		public const string VTPIC_Folder = "fdr";
		public const string VTPIC_Folder2 = "fdr";
		public const string VTPIC_FolderCur = "fdrcur";
		public const string VTPIC_FolderCurMinus = "fdrcurm";
		public const string VTPIC_FolderCurPlus = "fdrcurp";
		public const string VTPIC_FolderMinus = "fdrmnus";
		public const string VTPIC_FolderOpen = "fdropen";
		public const string VTPIC_FolderOpen2 = "fdropen";
		public const string VTPIC_FolderPlus = "fdrplus";
		public const string VTPIC_FontPrinter = "fonprtr";
		public const string VTPIC_FontTrueType = "fontrtyp";
		public const string VTPIC_MinusDark = "minusdk";
		public const string VTPIC_MinusLight = "minuslt";
		public const string VTPIC_MinusWhite = "minuswht";
		public const string VTPIC_MyComputer = "mycomp";
		public const string VTPIC_NetworkNeighborhood = "netneigh";
		public const string VTPIC_PlusDark = "plusdk";
		public const string VTPIC_PlusLight = "pluslt";
		public const string VTPIC_PlusWhite = "pluswht";
		public const string VTPIC_PrevDirectory = "prevdir";
		public const string VTPIC_RadioOn = "radon2";
		public const string VTPIC_RadioOff = "radoff2";
		public const string VTPIC_CheckBoxOn = "ckbxon2";
		public const string VTPIC_CheckBoxOff = "ckbxoff2";
		public const int VK_LeftButton = 1;
		public const int VK_RightButton = 2;
		public const int VK_Cancel = 3;
		public const int VK_MiddleButton = 4;
		public const int VK_Backspace = 8;
		public const int VK_Tab = 9;
		public const int VK_Clear = 12;
		public const int VK_Enter = 13;
		public const int VK_Shift = 16;
		public const int VK_Control = 17;
		public const int VK_Alt = 18;
		public const int VK_Pause = 19;
		public const int VK_CapsLock = 20;
		public const int VK_Escape = 27;
		public const int VK_Space = 32;
		public const int VK_PageUp = 33;
		public const int VK_PageDown = 34;
		public const int VK_End = 35;
		public const int VK_Home = 36;
		public const int VK_Left = 37;
		public const int VK_Up = 38;
		public const int VK_Right = 39;
		public const int VK_Down = 40;
		public const int VK_Select = 41;
		public const int VK_Execute = 43;
		public const int VK_PrintScreen = 44;
		public const int VK_Insert = 45;
		public const int VK_Delete = 46;
		public const int VK_Help = 47;
		public const int VK_0 = 48;
		public const int VK_1 = 49;
		public const int VK_2 = 50;
		public const int VK_3 = 51;
		public const int VK_4 = 52;
		public const int VK_5 = 53;
		public const int VK_6 = 54;
		public const int VK_7 = 55;
		public const int VK_8 = 56;
		public const int VK_9 = 57;
		public const int VK_A = 65;
		public const int VK_B = 66;
		public const int VK_C = 67;
		public const int VK_D = 68;
		public const int VK_E = 69;
		public const int VK_F = 70;
		public const int VK_G = 71;
		public const int VK_H = 72;
		public const int VK_I = 73;
		public const int VK_J = 74;
		public const int VK_K = 75;
		public const int VK_L = 76;
		public const int VK_M = 77;
		public const int VK_N = 78;
		public const int VK_O = 79;
		public const int VK_P = 80;
		public const int VK_Q = 81;
		public const int VK_R = 82;
		public const int VK_S = 83;
		public const int VK_T = 84;
		public const int VK_U = 85;
		public const int VK_V = 86;
		public const int VK_W = 87;
		public const int VK_X = 88;
		public const int VK_Y = 89;
		public const int VK_Z = 90;
		public const int VK_Multiply = 106;
		public const int VK_Add = 107;
		public const int VK_Separator = 108;
		public const int VK_Subtract = 109;
		public const int VK_Decimal = 110;
		public const int VK_Divide = 111;
		public const int VK_F1 = 112;
		public const int VK_F2 = 113;
		public const int VK_F3 = 114;
		public const int VK_F4 = 115;
		public const int VK_F5 = 116;
		public const int VK_F6 = 117;
		public const int VK_F7 = 118;
		public const int VK_F8 = 119;
		public const int VK_F9 = 120;
		public const int VK_F10 = 121;
		public const int VK_F11 = 122;
		public const int VK_F12 = 123;
		public const int VK_NumLock = 144;
		public const int VK_ScrollLock = 145;
		public const int DBF_IncrementalTime = 65536;
		public const int DBF_RealTime = 131072;
		public const int DBF_MessageBox = 524288;
		public const int DOS_VerifyFlag = 1;
		public const int DOS_BreakFlag = 2;
		public const int DOS_ErrorMode = 4;
		public const int DRIVE_Floppy = 2;
		public const int DRIVE_Fixed = 3;
		public const int DRIVE_Network = 4;
		public const int DRIVE_CDROM = 5;
		public const int DRIVE_RAM = 6;
		public const int FILETYPE_Program = 1;
		public const int FILETYPE_Document = 2;
		public const int FILETYPE_System = 3;
		public const int FILETYPE_Other = 4;
		public const int FA_Volume = 8;
		public const int SEEK_Begin = 0;
		public const int SEEK_Current = 1;
		public const int SEEK_End = 2;
		public const int SHOW_AllLevels = 32767;
		public const int DROP_Child = 1;
		public const int DROP_Sibling = 2;
		public const int FONTTYPE_Device = 1;
		public const int FONTTYPE_Raster = 2;
		public const int FONTTYPE_TrueType = 4;
		public const uint ITEM_IsDisabled = 16777216u;
		public const uint ITEM_IsHidden = 33554432u;
		public const uint ITEM_IsSelected = 67108864u;
		public const uint ITEM_IsFocus = 134217728u;
		public const uint ITEM_IsFrame = 268435456u;
		public const uint ITEM_IsDeleted = 536870912u;
		public const uint ITEM_IsParent = 1073741824u;
		public const uint ITEM_IsExpanded = 2147483648u;
		public const uint ITEM_CanPromote = 65536u;
		public const uint ITEM_CanDemote = 131072u;
		public const uint ITEM_CanMoveUp = 262144u;
		public const uint ITEM_CanMoveDown = 524288u;
		public const uint ITEM_CanExpand = 1048576u;
		public const uint ITEM_CanCollapse = 2097152u;
		public const int LBS_VisExtensions = 1;
		public const int LBS_FmtUppercase = 2;
		public const int LBS_FmtLowercase = 4;
		public const int LBS_ShowSelectColor = 8;
		public const int LBS_ShowSelectBkgd = 32768;
		public const int LBS_ShowSelectText = 16;
		public const int LBS_ShowPicCenter = 32;
		public const int LBS_ShowNoTree = 64;
		public const int LBS_ShowNoEditSelect = 128;
		public const int LBS_ShowNoEditText = 256;
		public const int LBS_KillFocusNoSelect = 512;
		public const int LBS_KillFocusFrameSelect = 1024;
		public const int LBS_SetWidthEachInsert = 4096;
		public const int LBS_ShowNoSelect = 8192;
		public const int LBS_ShowSelectTextPicture = 16384;
		public const int LBS_ShowHorzScrollBar = 65536;
		public const int LBS_Explorer = 131072;
		public const int LBS_FmtMixedcase = 262144;
		public const int LBS_Editable = 524288;
		public const int LBS_DragSelect = 16777216;
		public const int LBS_DisableNoScroll = 33554432;
		public const int LBS_NoAutoResize = 67108864;
		public const int LBS_ExtendedCombo = 134217729;
		public const int LVS_Icon = 0;
		public const int LVS_Report = 1;
		public const int LVS_SmallIcon = 2;
		public const int LVS_List = 3;
		public const int LVS_TypeMask = 3;
		public const int LVS_SingleSel = 4;
		public const int LVS_ShowSelAlways = 8;
		public const int LVS_NoLabelWrap = 128;
		public const int LVS_AutoArrange = 256;
		public const int LVS_EditLabels = 512;
		public const int LVS_NoScroll = 8192;
		public const int LVS_TypeStyleMask = 64512;
		public const int LVS_AlignTop = 0;
		public const int LVS_AlignLeft = 2048;
		public const int LVS_AlignMask = 3072;
		public const int LVS_NoColumnHeader = 16384;
		public const int LVS_NoSortHeader = 32768;
		public const int LVSORT_Ascending = 0;
		public const int LVSORT_Descending = 1;
		public const int LVIF_Text = 1;
		public const int LVIF_Image = 2;
		public const int LVIF_Param = 4;
		public const int LVIF_State = 8;
		public const int LVIS_Focused = 1;
		public const int LVIS_Selected = 2;
		public const int LVIS_Cut = 4;
		public const int LVIS_DropHilited = 8;
		public const int LVIS_StateImageMask = 61440;
		public const int LVNI_All = 0;
		public const int LVNI_Focused = 1;
		public const int LVNI_Selected = 2;
		public const int LVNI_Cut = 4;
		public const int LVNI_DropHilited = 8;
		public const int LVNI_Above = 256;
		public const int LVNI_Below = 512;
		public const int LVNI_ToLeft = 1024;
		public const int LVNI_ToRight = 2048;
		public const int LVFI_String = 2;
		public const int LVFI_Partial = 8;
		public const int LVFI_Wrap = 32;
		public const int LVFI_NearestXY = 64;
		public const int LVIR_Bounds = 0;
		public const int LVIR_Icon = 1;
		public const int LVIR_Label = 2;
		public const int LVIR_SelectBounds = 3;
		public const int LVHT_Nowhere = 1;
		public const int LVHT_OnItemIcon = 2;
		public const int LVHT_OnItemLabel = 4;
		public const int LVHT_OnItemStateIcon = 8;
		public const int LVHT_OnItem = 14;
		public const int LVHT_Above = 8;
		public const int LVHT_Below = 16;
		public const int LVHT_ToRight = 32;
		public const int LVHT_ToLeft = 64;
		public const int LVA_Default = 0;
		public const int LVA_AlignLeft = 1;
		public const int LVA_AlignTop = 2;
		public const int LVA_SnapToGrid = 5;
		public const int LVCF_Fmt = 1;
		public const int LVCF_Width = 2;
		public const int LVCF_Text = 4;
		public const int LVCFMT_Left = 0;
		public const int LVCFMT_Right = 1;
		public const int LVCFMT_Center = 2;
		public const int LVCFMT_JustifyMask = 3;
		public const int LVN_First = -100;
		public const int LVN_ItemChanging = -100;
		public const int LVN_ItemChanged = -101;
		public const int LVN_InsertItem = -102;
		public const int LVN_DeleteItem = -103;
		public const int LVN_DeleteAllItems = -104;
		public const int LVN_ColumnClick = -108;
		public const int LVN_BeginDrag = -109;
		public const int LVN_BeginRDrag = -111;
		public const int MF_Disable = 3;
		public const int MF_Check = 8;
		public const int MF_Separator = 2048;
		public const int SM_XScreen = 0;
		public const int SM_YScreen = 1;
		public const int SM_XVScroll = 2;
		public const int SM_YHScroll = 3;
		public const int SM_YCaption = 4;
		public const int SM_XBorder = 5;
		public const int SM_YBorder = 6;
		public const int SM_XDlgFrame = 7;
		public const int SM_YDlgFrame = 8;
		public const int SM_YVThumb = 9;
		public const int SM_XHThumb = 10;
		public const int SM_XIcon = 11;
		public const int SM_YIcon = 12;
		public const int SM_XCursor = 13;
		public const int SM_YCursor = 14;
		public const int SM_YMenu = 15;
		public const int SM_XFullScreen = 16;
		public const int SM_YFullScreen = 17;
		public const int SM_YKanjiWindow = 18;
		public const int SM_MousePresent = 19;
		public const int SM_YVScroll = 20;
		public const int SM_XHScroll = 21;
		public const int SM_Debug = 22;
		public const int SM_SwapButton = 23;
		public const int SM_XMin = 28;
		public const int SM_YMin = 29;
		public const int SM_XSize = 30;
		public const int SM_YSize = 31;
		public const int SM_XFrame = 32;
		public const int SM_YFrame = 33;
		public const int SM_XMinTrack = 34;
		public const int SM_YMinTrack = 35;
		public const int SM_XDoubleClick = 36;
		public const int SM_YDoubleClick = 37;
		public const int SM_XIconSpacing = 38;
		public const int SM_YIconSpacing = 39;
		public const int SM_MenuDropAlignment = 40;
		public const int SM_PenWindows = 41;
		public const int SM_DBCSEnabled = 42;
		public const int WAIT_TempOn = 2;
		public const int WAIT_TempOff = 3;
		public const int WAIT_SysModalOn = 4;
		public const int WAIT_SysModalOff = 5;
		public const int WF_PMode = 1;
		public const int WF_CPU286 = 2;
		public const int WF_CPU386 = 4;
		public const int WF_CPU486 = 8;
		public const int WF_Standard = 16;
		public const int WF_Enhanced = 32;
		public const int WF_80x87 = 1024;
		public const int WF_Paging = 2048;
		public const int WF_WLO = 32768;
		public const int MBF_IconAsterisk = 65536;
		public const int MBF_IconHand = 131072;
		public const int MBF_IconQuestion = 262144;
		public const int MBF_IconExclamation = 524288;
		public const int MBF_DefButton = 1;
		public const int MBF_IconInformation = 65536;
		public const int MBF_IconError = 131072;
		public const int MBF_IconStop = 131072;
		public const int MBF_IconWarning = 524288;
		public const int PALN_ErrSpace = -1;
		public const int PALN_Changed = 1;
		public const int PALN_Finished = 2;
		public const int PALN_Menu = 3;
		public const int PAL_EnableMRUColors = 4;
		public const int PAL_NoHideSelects = 8;
		public const int COLOR_PAL_BackColor = 0;
		public const int COLOR_PAL_BackMenu = 2;
		public const int REGION_Main = 0;
		public const int REGION_Menu = 1;
		public const int REGION_MRU = 2;
		public const int PALETTE_Main = 0;
		public const int PALETTE_MRU = 1;
		public const int VTM_SpinSetMin = 1025;
		public const int VTM_SpinSetMax = 1026;
		public const int VTM_SpinSetIncrement = 1027;
		public const int VTM_SpinSetValue = 1028;
		public const int VTM_SpinScrollUp = 1029;
		public const int VTM_SpinScrollDown = 1030;
		public const int VTM_SpinGetValue = 1031;
		public const int ORIENT_SPLIT_Unset = -1;
		public const int ORIENT_SPLIT_Horizontal = 0;
		public const int ORIENT_SPLIT_Vertical = 1;
		public const int ROW_UserFlag1 = 128;
		public const int ROW_UserFlag2 = 256;
		public const int ROW_UserFlag3 = 512;
		public const int ROW_UserFlag4 = 1024;
		public const int ROW_UserFlag5 = 2048;
		public const int KDS_None = 0;
		public const int KDS_Shift = 1;
		public const int KDS_Ctrl = 2;
		public const int KDS_ShiftCtrl = 3;
		public const int KDS_Alt = 4;
		public const int KDS_AltShift = 5;
		public const int KDS_AltCtrl = 6;
		public const int KDS_ShiftAltCtrl = 7;
		public const int SHOW_Hidden = 0;
		public const int SHOW_Normal = 1;
		public const int SHOW_Minimized = 2;
		public const int SHOW_Maximized = 3;
		public const int WF_Required = 1;
		public const int WF_NoClear = 2;
		public const int WF_NoClearEditFlag = 4;
		public const int WF_FitPath = 8;
		public const int WF_DisplayOnly = 16;
		public const int WF_EnableWhenNotNull = 65536;
		public const int VT_SWP_NoZOrder = 4;
		public const int REN_ErrSpace = 0;
		public const int REN_Protected = 1;
		public const int REN_RequestResize = 2;
		public const int REN_SelChange = 3;
		public const int REN_Change = 4;
		public const int REN_HScroll = 5;
		public const int REN_VScroll = 6;
		public const int REN_Update = 7;
		public const int REN_MaxText = 8;
		public const int REF_AutoWordSelection = 1;
		public const int REF_AutoVScroll = 64;
		public const int REF_AutoHScroll = 128;
		public const int REF_ReadOnly = 2048;
		public const int REF_NoHideSel = 256;
		public const int REF_SaveSelection = 32768;
		public const int REF_Vertical = 4194304;
		public const int REF_SEL_Empty = 0;
		public const int REF_SEL_Text = 1;
		public const int REF_SEL_Object = 2;
		public const int REF_SEL_MultiChar = 4;
		public const int REF_SEL_MultiObject = 8;
		public const int REF_FT_MatchCase = 4;
		public const int REF_FT_WholeWord = 2;
		public const int REF_CFE_AutoColor = 1073741824;
		public const int REF_CFE_Bold = 1;
		public const int REF_CFE_Italic = 2;
		public const int REF_CFE_Underline = 4;
		public const int REF_CFE_Strikeout = 8;
		public const int REF_CFE_Protected = 16;
		public const int REF_PFA_Left = 1;
		public const int REF_PFA_Right = 2;
		public const int REF_PFA_Center = 3;
		public const int REF_PFN_Bullet = 1;
		private const string WINFLAGS = "VT:WinFlags";
		public static SalNumber PicDriveCD = 0;
		public static SalNumber PicDriveRemovable = 0;
		public static SalNumber PicDriveFixed = 0;
		public static SalNumber PicDriveNetwork = 0;
		public static SalNumber PicDriveFloppy = 0;
		public static SalNumber PicFolderOpen = 0;
		public static SalNumber PicFolderClosed = 0;
		public static SalNumber PicDesktop = 0;
		public static SalNumber PicMyComputer = 0;
		public static SalNumber PicNetworkNeighborhood = 0;
		private static int m_waitCursorRef = 0;
		public static SalNumber PicTTFont = 0;
		private static ResourceManager resources = null;
		private static ResourceManager Resources
		{
			get
			{
				if (Vis.resources == null)
				{
					lock (typeof(Vis))
					{
						if (Vis.resources == null)
						{
							Vis.resources = new ResourceManager("PPJ.Runtime.Vis.Properties.Resources", typeof(Vis).Assembly);
						}
					}
				}
				return Vis.resources;
			}
		}
		[NewSyntax(typeof(SalArray), BindingFlags.Instance, "Fill")]
		public static SalBoolean ArrayFillDateTime(SalArray<SalDateTime> dtArray, SalDateTime dtValue, SalNumber nCount)
		{
			return dtArray.Fill(dtValue, nCount);
		}
		[NewSyntax(typeof(SalArray), BindingFlags.Instance, "Fill")]
		public static SalBoolean ArrayFillNumber(SalArray<SalNumber> nArray, SalNumber nValue, SalNumber nCount)
		{
			return nArray.Fill(nValue, nCount);
		}
		[NewSyntax(typeof(SalArray), BindingFlags.Instance, "Fill")]
		public static SalBoolean ArrayFillString(SalArray<SalString> sArray, SalString sValue, SalNumber nCount)
		{
			return sArray.Fill(sValue, nCount);
		}
		public static SalNumber ArrayFindDateTime(SalArray<SalDateTime> hArray, SalDateTime dtSearchFor)
		{
			if (hArray.IsMultidimensional)
			{
				return -1;
			}
			if (!hArray.IsEmpty)
			{
				long ticks = dtSearchFor.Ticks;
				int num = hArray.GetLowerBound(1);
				int num2 = hArray.GetUpperBound(1);
				SalDateTime[] array = hArray.GetArray(num);
				for (int i = num; i <= num2; i++)
				{
					if (array[i].Ticks == ticks)
					{
						return i;
					}
				}
			}
			return -1;
		}
		public static SalNumber ArrayFindNumber(SalArray<SalNumber> hArray, SalNumber nSearchFor)
		{
			if (hArray.IsMultidimensional)
			{
				return -1;
			}
			if (!hArray.IsEmpty)
			{
				
				int num = hArray.GetLowerBound(1);
				int num2 = hArray.GetUpperBound(1);
				SalNumber[] array = hArray.GetArray(num);
				for (int i = num; i <= num2; i++)
				{
					if (SalNumber.Compare(array[i], nSearchFor) == 0)
					{
						return i;
					}
				}
			}
			return -1;
		}
		public static SalNumber ArrayFindNumber(SalArray<SalBoolean> hArray, SalBoolean bSearchFor)
		{
			if (hArray.IsMultidimensional)
			{
				return -1;
			}
			if (!hArray.IsEmpty)
			{
				
				int num = hArray.GetLowerBound(1);
				int num2 = hArray.GetUpperBound(1);
				SalBoolean[] array = hArray.GetArray(num);
				for (int i = num; i <= num2; i++)
				{
					if (SalBoolean.Compare(array[i], bSearchFor) == 0)
					{
						return i;
					}
				}
			}
			return -1;
		}
		public static SalNumber ArrayFindString(SalArray<SalString> hArray, SalString sSearchFor)
		{
			if (hArray.IsMultidimensional)
			{
				return -1;
			}
			if (!hArray.IsEmpty)
			{
				
				int num = hArray.GetLowerBound(1);
				int num2 = hArray.GetUpperBound(1);
				SalString[] array = hArray.GetArray(num);
				for (int i = num; i <= num2; i++)
				{
					SalString salString = array[i];
					if (salString == (string)null)
					{
						if (sSearchFor.IsEmpty)
						{
							return i;
						}
					}
					else
					{
						if (string.Compare(salString, sSearchFor, StringComparison.OrdinalIgnoreCase) == 0)
						{
							return i;
						}
					}
				}
			}
			return -1;
		}
		public static SalNumber ArrayInsertItem(SalArray hArray, SalNumber nIndex, SalNumber nDataType)
		{
			if (hArray.IsEmpty && !hArray.IsDynamic)
			{
				return -1;
			}
			SalNumber result;
			try
			{
				if (nIndex == 0 && hArray.IsEmpty && hArray.IsDynamic)
				{
					hArray.Insert(hArray.GetLowerBound(1));
				}
				hArray.Insert(nIndex);
				if (nDataType == 3)
				{
					hArray[new int[]
					{
						nIndex
					}] = SalNumber.Null;
				}
				result = hArray.Length;
			}
			catch (ArgumentOutOfRangeException)
			{
				result = -87;
			}
			catch (Exception e)
			{
				Sys.TraceException(Sys.TraceSystem, e, TraceLevel.Error);
				result = -1;
			}
			return result;
		}
		public static SalNumber ArraySort(SalArray hArray, SalNumber nSortOrder, SalNumber nDataType)
		{
			Vis.ArrayComparer arrayComparer = new Vis.ArrayComparer();
			if (nSortOrder == 1)
			{
				arrayComparer.SortDirection = 1;
			}
			hArray.Sort(hArray.GetLowerBound(1), hArray.Length, arrayComparer);
			return hArray.Length;
		}
		
		public static SalString GetVersion()
		{
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			Version version = executingAssembly.GetName().Version;
			return string.Concat(new object[]
			{
				"9.",
				version.Major,
				".",
				version.Minor,
				"-",
				version.Revision,
				".",
				version.Build
			});
		}
		public static SalNumber GetWinVersion()
		{
			return Environment.OSVersion.Version.Major;
		}
		public static SalNumber SendMsgString(SalWindowHandle hWnd, SalNumber nMessage, SalNumber wParam, SalString lParam)
		{
			int x = (int)Vis.WinSDK.SendMessageA(hWnd, nMessage, wParam, lParam);
			return x;
		}
		public static SalNumber WaitCursor(SalNumber nFlags)
		{
			switch (nFlags)
			{
			case 0:
				if (Vis.m_waitCursorRef <= 0)
				{
					return 0;
				}
				Vis.m_waitCursorRef--;
				if (Vis.m_waitCursorRef == 0)
				{
					Cursor.Current = Cursors.Default;
				}
				break;
			case 1:
				Vis.m_waitCursorRef++;
				if (Vis.m_waitCursorRef == 1)
				{
					Cursor.Current = Cursors.WaitCursor;
				}
				break;
			case 2:
			case 4:
				Cursor.Current = Cursors.WaitCursor;
				break;
			case 3:
			case 5:
				Cursor.Current = Cursors.Default;
				break;
			}
			return 0;
		}
		public static SalString GetCopyright()
		{
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			object[] customAttributes = executingAssembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
			if (customAttributes != null && customAttributes.Length > 0)
			{
				return ((AssemblyCopyrightAttribute)customAttributes[0]).Copyright;
			}
			throw new InvalidOperationException(Vis.GetString("MissingCopyright"));
		}
		public static SalNumber GetKeyState(SalNumber nVirtKey)
		{
			return Vis.WinSDK.GetKeyState(nVirtKey);
		}
		public static SalNumber NumberChoose(SalBoolean bExpression, SalNumber nTrue, SalNumber nFalse)
		{
			if (!bExpression)
			{
				return nFalse;
			}
			return nTrue;
		}
		public static SalNumber NumberBitClear(ref SalNumber nValue, SalNumber nBitMask)
		{
			uint num = (uint)nValue;
			uint num2 = (uint)nBitMask;
			uint x = num & ~num2;
			nValue = x;
			return nValue;
		}
		public static SalNumber NumberBitSet(ref SalNumber nValue, SalNumber nBitMask)
		{
			uint num = (uint)nValue;
			uint num2 = (uint)nBitMask;
			uint x = num | num2;
			nValue = x;
			return nValue;
		}
		public static SalNumber NumberHighByte(SalNumber nNumber)
		{
			return ((uint)nNumber & 65535u) >> 8;
		}
		public static SalNumber NumberLowByte(SalNumber nNumber)
		{
			return (uint)nNumber & 255u;
		}
		public static SalNumber NumberMakeLong(SalNumber nLowWord, SalNumber nHighWord)
		{
			uint num = (uint)nLowWord & 65535u;
			uint num2 = (uint)nHighWord & 65535u;
			return num2 << 16 | num;
		}
		
		
		public static SalString DosBuildFullName(SalString sModuleName, SalString sFileName)
		{
			IntPtr moduleHandle = Vis.WinSDK.GetModuleHandle(sModuleName);
			if (moduleHandle == IntPtr.Zero)
			{
				return SalString.Null;
			}
			StringBuilder stringBuilder = new StringBuilder(2048);
			if (Vis.WinSDK.GetModuleFileName(moduleHandle, stringBuilder, 2048) == 0)
			{
				return SalString.Null;
			}
			return Path.Combine(Path.GetDirectoryName(stringBuilder.ToString()), sFileName);
		}
		public static SalNumber DosEnumDirInfo(SalString sDirSpec, SalArray<SalString> sDirs, SalArray<SalDateTime> dtDateTimes, SalArray<SalNumber> nAttributes)
		{
			if (sDirSpec.IsEmpty)
			{
				return -3;
			}
			SalNumber result;
			try
			{
				string fileName = Path.GetFileName(sDirSpec);
				string text = Path.GetDirectoryName(sDirSpec);
				if (text == null || text.Length == 0)
				{
					text = Directory.GetCurrentDirectory();
				}
				string[] directories = Directory.GetDirectories(text, fileName);
				if (directories.Length == 0)
				{
					if (Directory.GetDirectories(text).Length == 0)
					{
						result = 0;
					}
					else
					{
						result = -2;
					}
				}
				else
				{
					int num = 0;
					string[] array = directories;
					for (int i = 0; i < array.Length; i++)
					{
						string text2 = array[i];
						if (num == 0)
						{
							int upper = directories.Length - 1;
							sDirs.SetBounds(0, upper);
							dtDateTimes.SetBounds(0, upper);
							nAttributes.SetBounds(0, upper);
						}
						if (!sDirs.IsMultidimensional)
						{
							sDirs[new int[]
							{
								num
							}] = text2.Substring(text2.LastIndexOf('\\') + 1);
						}
						if (!dtDateTimes.IsMultidimensional)
						{
							dtDateTimes[new int[]
							{
								num
							}] = Directory.GetCreationTime(text2);
						}
						if (!nAttributes.IsMultidimensional)
						{
							nAttributes[new int[]
							{
								num
							}] = File.GetAttributes(text2);
						}
						num++;
					}
					if (num > 0)
					{
						int upper2 = num - 1;
						sDirs.SetBounds(0, upper2);
						dtDateTimes.SetBounds(0, upper2);
						nAttributes.SetBounds(0, upper2);
					}
					result = num;
				}
			}
			catch (SystemException ex)
			{
				int num2 = Sys.GetExceptionHResult(ex) & 255;
				result = num2 * -1;
			}
			return result;
		}
		public static SalNumber DosEnumDirs(SalString sDirSpec, SalArray<SalString> sDirs)
		{
			if (sDirSpec.IsEmpty)
			{
				return -3;
			}
			SalNumber result;
			try
			{
				string fileName = Path.GetFileName(sDirSpec);
				string text = Path.GetDirectoryName(sDirSpec);
				if (text == null || text.Length == 0)
				{
					text = Directory.GetCurrentDirectory();
				}
				string[] directories = Directory.GetDirectories(text, fileName);
				if (directories.Length == 0)
				{
					if (Directory.GetDirectories(text).Length == 0)
					{
						result = 0;
					}
					else
					{
						result = -2;
					}
				}
				else
				{
					int num = 0;
					string[] array = directories;
					for (int i = 0; i < array.Length; i++)
					{
						string text2 = array[i];
						if (num == 0)
						{
							int upper = directories.Length - 1;
							sDirs.SetBounds(0, upper);
						}
						if (!sDirs.IsMultidimensional)
						{
							sDirs[new int[]
							{
								num
							}] = text2.Substring(text2.LastIndexOf('\\') + 1);
						}
						num++;
					}
					if (num > 0)
					{
						int upper2 = num - 1;
						sDirs.SetBounds(0, upper2);
					}
					result = num;
				}
			}
			catch (SystemException ex)
			{
				int num2 = Sys.GetExceptionHResult(ex) & 255;
				result = num2 * -1;
			}
			return result;
		}
		public static SalNumber DosEnumDrives(SalArray<SalString> sDrives)
		{
			SalNumber result;
			try
			{
				string[] logicalDrives = Directory.GetLogicalDrives();
				int num = 0;
				string[] array = logicalDrives;
				for (int i = 0; i < array.Length; i++)
				{
					string x = array[i];
					if (num == 0)
					{
						int upper = logicalDrives.Length - 1;
						sDrives.SetBounds(0, upper);
					}
					if (!sDrives.IsMultidimensional)
					{
						sDrives[new int[]
						{
							num
						}] = x;
					}
					num++;
				}
				if (num > 0)
				{
					int upper2 = num - 1;
					sDrives.SetBounds(0, upper2);
				}
				result = num;
			}
			catch (SystemException ex)
			{
				int num2 = Sys.GetExceptionHResult(ex) & 255;
				result = num2 * -1;
			}
			return result;
		}
		public static SalNumber DosEnumFileInfo(SalString sFileSpec, SalNumber nAttribute, SalArray<SalString> sFiles, SalArray<SalNumber> nSizes, SalArray<SalDateTime> dtDateTimes, SalArray<SalNumber> nAttributes)
		{
			if (sFileSpec.IsEmpty)
			{
				return -3;
			}
			SalNumber result;
			try
			{
				string fileName = Path.GetFileName(sFileSpec);
				string text = Path.GetDirectoryName(sFileSpec);
				if (text == null || text.Length == 0)
				{
					text = Directory.GetCurrentDirectory();
				}
				string[] files = Directory.GetFiles(text, fileName);
				if (files.Length == 0)
				{
					if (Directory.GetFiles(text).Length == 0)
					{
						result = 0;
					}
					else
					{
						result = -2;
					}
				}
				else
				{
					int num = 0;
					int num2 = nAttribute;
					string[] array = files;
					for (int i = 0; i < array.Length; i++)
					{
						string text2 = array[i];
						FileAttributes attributes = File.GetAttributes(text2);
						if (num2 == 0 || (num2 & (int)attributes) != 0)
						{
							if (num == 0)
							{
								int upper = files.Length - 1;
								sFiles.SetBounds(0, upper);
								nSizes.SetBounds(0, upper);
								dtDateTimes.SetBounds(0, upper);
								nAttributes.SetBounds(0, upper);
							}
							FileInfo fileInfo = new FileInfo(text2);
							if (!nSizes.IsMultidimensional)
							{
								nSizes[new int[]
								{
									num
								}] = fileInfo.Length;
							}
							if (!sFiles.IsMultidimensional)
							{
								sFiles[new int[]
								{
									num
								}] = text2.Substring(text2.LastIndexOf('\\') + 1);
							}
							if (!dtDateTimes.IsMultidimensional)
							{
								dtDateTimes[new int[]
								{
									num
								}] = fileInfo.CreationTime;
							}
							if (!nAttributes.IsMultidimensional)
							{
								nAttributes[new int[]
								{
									num
								}] = (int)fileInfo.Attributes;
							}
							num++;
						}
					}
					if (num > 0)
					{
						int upper2 = num - 1;
						sFiles.SetBounds(0, upper2);
						nSizes.SetBounds(0, upper2);
						dtDateTimes.SetBounds(0, upper2);
						nAttributes.SetBounds(0, upper2);
					}
					result = num;
				}
			}
			catch (SystemException ex)
			{
				int num3 = Sys.GetExceptionHResult(ex) & 255;
				result = num3 * -1;
			}
			return result;
		}
		public static SalNumber DosEnumFiles(SalString sFileSpec, SalNumber nAttributes, SalArray<SalString> sFiles)
		{
			if (sFileSpec.IsEmpty)
			{
				return -3;
			}
			SalNumber result;
			try
			{
				string fileName = Path.GetFileName(sFileSpec);
				string text = Path.GetDirectoryName(sFileSpec);
				if (text == null || text.Length == 0)
				{
					text = Directory.GetCurrentDirectory();
				}
				string[] files = Directory.GetFiles(text, fileName);
				if (files.Length == 0)
				{
					if (Directory.GetFiles(text).Length == 0)
					{
						result = 0;
					}
					else
					{
						result = -2;
					}
				}
				else
				{
					int num = 0;
					int num2 = nAttributes;
					string[] array = files;
					for (int i = 0; i < array.Length; i++)
					{
						string text2 = array[i];
						FileAttributes attributes = File.GetAttributes(text2);
						if (num2 == 0 || (num2 & (int)attributes) != 0)
						{
							if (num == 0)
							{
								int upper = files.Length - 1;
								sFiles.SetBounds(0, upper);
							}
							if (!sFiles.IsMultidimensional)
							{
								sFiles[new int[]
								{
									num
								}] = text2.Substring(text2.LastIndexOf('\\') + 1);
							}
							num++;
						}
					}
					if (num > 0)
					{
						int upper2 = num - 1;
						sFiles.SetBounds(0, upper2);
					}
					result = num;
				}
			}
			catch (SystemException ex)
			{
				int num3 = Sys.GetExceptionHResult(ex) & 255;
				result = num3 * -1;
			}
			return result;
		}
		
		public static SalNumber FileAppend(SalString sSourceFile, SalString sTargetFile)
		{
			if (sSourceFile.IsNull || sTargetFile.IsNull)
			{
				return -87;
			}
			if (sSourceFile.IsEmpty || sTargetFile.IsEmpty)
			{
				return -2;
			}
			if (!File.Exists(sTargetFile))
			{
				return -2;
			}
			FileStream fileStream = null;
			FileStream fileStream2 = null;
			SalNumber result;
			try
			{
				string fileName = Path.GetFileName(sSourceFile);
				string text = Path.GetDirectoryName(sSourceFile);
				if (text == null || text.Length == 0)
				{
					text = Directory.GetCurrentDirectory();
				}
				string[] files = Directory.GetFiles(text, fileName);
				if (files.Length == 0)
				{
					result = -2;
				}
				else
				{
					fileStream2 = File.OpenWrite(sTargetFile);
					fileStream2.Position = fileStream2.Length;
					string[] array = files;
					for (int i = 0; i < array.Length; i++)
					{
						string path = array[i];
						fileStream = File.OpenRead(path);
						byte[] array2 = new byte[(int)fileStream.Length];
						fileStream.Read(array2, 0, (int)fileStream.Length);
						fileStream.Close();
						fileStream = null;
						fileStream2.Write(array2, 0, array2.Length);
					}
					fileStream2.Close();
					fileStream2 = null;
					result = files.Length;
				}
			}
			catch (SystemException ex)
			{
				int num = Sys.GetExceptionHResult(ex) & 255;
				result = num * -1;
			}
			finally
			{
				if (fileStream != null)
				{
					fileStream.Close();
				}
				if (fileStream2 != null)
				{
					fileStream2.Close();
				}
			}
			return result;
		}
		
		
		public static SalString StrChoose(SalBoolean bExpression, SalString sTrue, SalString sFalse)
		{
			if (!bExpression)
			{
				return sFalse;
			}
			return sTrue;
		}
		public static SalString StrExpand(SalString sTemplate, SalArray hArray)
		{
			if (hArray.IsEmpty || hArray.IsMultidimensional || sTemplate.IsEmpty)
			{
				return SalString.Null;
			}
			Type elementType = hArray.GetElementType();
			if (!(elementType == typeof(SalNumber)) && !(elementType == typeof(SalString)) && !(elementType == typeof(string)) && !elementType.IsPrimitive)
			{
				return sTemplate;
			}
			string text = sTemplate;
			StringBuilder stringBuilder = new StringBuilder();
			int num = 0;
			int num2 = 0;
			int num3 = 0;
			int num4 = text.IndexOf('%');
			bool flag = elementType == typeof(SalNumber) || elementType.IsPrimitive;
			while (num4 >= 0 && num4 < text.Length - 1)
			{
				string text2 = text.Substring(num4 + 1);
				string text3 = text.Substring(num, num4 - num);
				bool flag2 = false;
				int num5 = text3.LastIndexOf("{");
				if (num5 >= 0 && (text3.LastIndexOf("}") < 0 || num5 > text3.LastIndexOf("}")))
				{
					num2 = text2.IndexOf("}");
					if (num2 >= 0 && (text2.IndexOf("{") < 0 || num2 < text2.IndexOf("{")))
					{
						flag2 = true;
					}
				}
				if (flag2)
				{
					if (text[num4 + 1] == '%')
					{
						stringBuilder.Append(text.Substring(num, num4 - num + 1));
						num = num4 + 2;
					}
					else
					{
						int num6 = (text[num4 + 1] == ',') ? 1 : 0;
						if (text.Length > num4 + 1 + num6)
						{
							char c = text[num4 + 1 + num6];
							if ((flag && (c == 'u' || c == 'n')) || (!flag && (c == 'u' || c == 's')))
							{
								stringBuilder.Append(text.Substring(num, num5));
								string value = text3.Substring(num5 + 1);
								string value2 = text2.Substring(1 + num6, num2 - 1 - num6);
								for (int i = 0; i < hArray.Count; i++)
								{
									stringBuilder.Append((i > 0 && num6 > 0) ? "," : "");
									stringBuilder.Append(value);
									if (c == 'u')
									{
										stringBuilder.Append(i);
									}
									else
									{
										if (flag)
										{
											stringBuilder.Append(Convert.ToInt32(hArray[new int[]
											{
												i
											}]));
										}
										else
										{
											stringBuilder.Append(hArray[new int[]
											{
												i
											}].ToString());
										}
									}
									stringBuilder.Append(value2);
								}
								num = num4 + num2 + 2;
							}
							else
							{
								stringBuilder.Append(text.Substring(num, num4 - num + 1));
								num = num4 + 1;
							}
						}
						else
						{
							stringBuilder.Append(text.Substring(num4));
						}
					}
				}
				else
				{
					char c2 = text[num4 + 1];
					if (c2 == '%')
					{
						stringBuilder.Append(text.Substring(num, num4 - num + 1));
						num = num4 + 2;
					}
					else
					{
						if ((flag && (c2 == 'u' || c2 == 'n')) || (!flag && (c2 == 'u' || c2 == 's')))
						{
							if (num3 >= hArray.Count)
							{
								stringBuilder.Append(text.Substring(num, num4 - num + 2));
							}
							else
							{
								stringBuilder.Append(text.Substring(num, num4 - num));
								if (c2 == 'u')
								{
									stringBuilder.Append(num3);
								}
								else
								{
									if (flag)
									{
										stringBuilder.Append(Convert.ToInt32(hArray[new int[]
										{
											num3
										}]));
									}
									else
									{
										stringBuilder.Append(hArray[new int[]
										{
											num3
										}].ToString());
									}
								}
								num3++;
							}
							num = num4 + 2;
						}
						else
						{
							stringBuilder.Append(text.Substring(num, num4 - num + 1));
							num = num4 + 1;
						}
					}
				}
				num4 = text.IndexOf('%', num);
			}
			stringBuilder.Append(text.Substring(num));
			return stringBuilder.ToString();
		}
		
		public static SalString StrFind(SalNumber hTable, SalString sKey)
		{
			if (hTable > 0)
			{
				Hashtable hashtable = (Hashtable)((GCHandle)hTable.ToIntPtr()).Target;
				return (string)hashtable[sKey];
			}
			return "";
		}
		public static SalString StrLeftTrim(SalString sSource)
		{
			if (sSource.IsEmpty)
			{
				return sSource;
			}
			return sSource.Value.TrimStart(new char[0]);
		}
		public static SalString StrPad(SalString sSource, SalNumber nSize)
		{
			if (sSource.IsNull)
			{
				return sSource;
			}
			if (nSize < 0)
			{
				return SalString.Null;
			}
			if (sSource.Length > nSize)
			{
				return sSource.Value.Substring(0, nSize);
			}
			return sSource.Value.PadRight(nSize, ' ');
		}
		public static SalString StrProper(SalString sSource)
		{
			if (sSource.IsEmpty)
			{
				return sSource;
			}
			bool flag = true;
			StringBuilder stringBuilder = new StringBuilder();
			string text = sSource;
			for (int i = 0; i < text.Length; i++)
			{
				char c = sSource[i];
				if (flag)
				{
					c = char.ToUpper(c);
				}
				else
				{
					c = char.ToLower(c);
				}
				stringBuilder.Append(c);
				flag = false;
				if ("!@#$%^&*()_+-=|\\[]{}:\";'?,./ \t\r\n".IndexOf(c) > -1)
				{
					flag = true;
				}
				else
				{
					if (c == 'M')
					{
						if (string.Compare(text, i, "Mc", 0, 2, StringComparison.OrdinalIgnoreCase) == 0)
						{
							i++;
							flag = true;
							stringBuilder.Append('c');
						}
						else
						{
							if (string.Compare(text, i, "Mac", 0, 3, StringComparison.OrdinalIgnoreCase) == 0)
							{
								i += 2;
								flag = true;
								stringBuilder.Append("ac");
							}
						}
					}
					else
					{
						if (c == 'O' && string.Compare(text, i, "O'", 0, 2, StringComparison.OrdinalIgnoreCase) == 0)
						{
							i++;
							flag = true;
							stringBuilder.Append('\'');
						}
					}
				}
			}
			return stringBuilder.ToString();
		}
		public static SalString StrRightTrim(SalString sSource)
		{
			if (sSource.IsEmpty)
			{
				return sSource;
			}
			return sSource.Value.TrimEnd(new char[0]);
		}
		public static SalNumber StrScanReverse(SalString sSource, SalNumber nPos, SalString sSearch)
		{
			if (sSource.IsEmpty || sSearch.IsNull)
			{
				return -1;
			}
			int num = nPos;
			if (num >= sSource.Length || num < -1)
			{
				return -1;
			}
			if (num == -1)
			{
				num = sSource.Length - sSearch.Length;
			}
			if (sSearch.IsEmpty)
			{
				return num;
			}
			string strA = sSource;
			string text = sSearch;
			for (int i = num; i >= 0; i--)
			{
				if (string.Compare(strA, i, text, 0, text.Length, true) == 0)
				{
					return i;
				}
			}
			return -1;
		}
		
		public static SalString StrTrim(SalString sSource)
		{
			if (sSource.IsEmpty)
			{
				return sSource;
			}
			return sSource.Value.Trim();
		}
		
		public static SalNumber WinGetStyle(SalWindowHandle hWnd)
		{
			if (!hWnd)
			{
				return -1;
			}
			return Vis.WinSDK.GetWindowLong(hWnd, -16);
		}
		public static SalString WinGetText(Control ctrl)
		{
			return SalWindow.GetText(ctrl);
		}
		public static SalBoolean WinIsChild(SalWindowHandle hWndParent, SalWindowHandle hWndChild)
		{
			return Vis.WinSDK.IsChild(hWndParent, hWndChild);
		}
		public static SalBoolean WinIsMaximized(SalWindowHandle hWnd)
		{
			return Vis.WinSDK.IsZoomed(hWnd);
		}
		public static SalBoolean WinIsMinimized(SalWindowHandle hWnd)
		{
			return Vis.WinSDK.IsIconic(hWnd);
		}
		public static SalBoolean WinIsRestored(SalWindowHandle hWnd)
		{
			return Vis.WinIsWindow(hWnd) && !Vis.WinIsMaximized(hWnd) && !Vis.WinIsMinimized(hWnd);
		}
		public static SalBoolean WinIsWindow(SalWindowHandle hWnd)
		{
			return Vis.WinSDK.IsWindow(hWnd);
		}
		public static SalBoolean WinMove(SalWindowHandle hWnd, SalNumber nLeft, SalNumber nTop, SalNumber nWidht, SalNumber nHeight)
		{
			return Vis.WinSDK.MoveWindow(hWnd, nLeft, nTop, nWidht, nHeight, true);
		}
		public static SalBoolean WinRemoveProp(SalWindowHandle hWnd, SalString sPropName)
		{
			return Vis.WinSDK.RemoveProp(hWnd, sPropName);
		}
		private static string GetUniversalName(string filepath)
		{
			if (filepath == string.Empty || filepath.IndexOf(":") > 1 || filepath.Length < 2)
			{
				return filepath;
			}
			if (filepath.StartsWith("\\"))
			{
				return new Uri(filepath).LocalPath;
			}
			ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("SELECT RemoteName FROM win32_NetworkConnection WHERE LocalName = '" + filepath.Substring(0, 2) + "'");
			using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = managementObjectSearcher.Get().GetEnumerator())
			{
				if (enumerator.MoveNext())
				{
					ManagementObject managementObject = (ManagementObject)enumerator.Current;
					string uriString = managementObject["RemoteName"] as string;
					return new Uri(uriString).LocalPath;
				}
			}
			return filepath;
		}
		internal static string GetString(string text)
		{
			return Vis.Resources.GetString(text);
		}
	}
}
